import request from '@/utils/request'

// 查询仓库数据列表
export function listKcmData(query) {
  return request({
    url: '/repertory/kcmData/list',
    method: 'get',
    params: query
  })
}

// 查询仓库数据详细
export function getKcmData(kcmId) {
  return request({
    url: '/repertory/kcmData/' + kcmId,
    method: 'get'
  })
}

// 查询呆滞物料
export function listSectionDeadMaterials(query) {
  return request({
    url: '/repertory/kcmData/getSectionDeadMaterials',
    method: 'get',
    params: query,
  })
}

// 新增仓库数据
export function addKcmData(data) {
  return request({
    url: '/repertory/kcmData',
    method: 'post',
    data: data
  })
}

// 修改仓库数据
export function updateKcmData(data) {
  return request({
    url: '/repertory/kcmData',
    method: 'put',
    data: data
  })
}

// 删除仓库数据
export function delKcmData(kcmId) {
  return request({
    url: '/repertory/kcmData/' + kcmId,
    method: 'delete'
  })
}

// 导出仓库数据
export function exportKcmData(query) {
  return request({
    url: '/repertory/kcmData/export',
    method: 'get',
    params: query
  })
}

// 导出呆滞物料
export function exportSectionDeadMaterials(query) {
  return request({
    url: '/repertory/kcmData/exportSectionDeadMaterials',
    method: 'get',
    params: query,
  })
}
